extends AnimatedSprite2D

var char = null

func _ready() -> void:
	char = get_node("/root/Main/Character")
	animation = str(randi_range(1, 5))
	rotation = randf_range(-PI, PI)
	scale *= randf_range(1, 4)
	
func _process(delta: float) -> void:
	if global_position.distance_to(char.global_position) > 10000:
		get_parent().queue_free()
		queue_free()
